<%@ include file="/common/taglibs.jsp"%>
<%@ page import="org.springframework.context.ApplicationContext" %>
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %>
<%@ page import="com.probiz.estore.core.view.MessageContext" %>
<%
	ApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(application);
	MessageContext messageContext = (MessageContext)ctx.getBean("messageContext");
	String sendSucess = messageContext.getMessage("tool.solrIndex.success");
	String sendFalse = messageContext.getMessage("tool.solrIndex.false");
	request.setAttribute("sendSucess",sendSucess);
	request.setAttribute("sendFalse",sendFalse);
%>
<title><fmt:message key="solrIndexMgr.heading"/></title>
<content tag="buttons">
	<probiz:iconBtn btnType="reloadAll" onclick="return rebuildIndex();" btnTextKey="button.reloadAll"/>
</content>

<div class="top clearfix">
	<ul class="tab">
		<li class="curr"><span><fmt:message key="solrIndexMgr.heading"/></span></li>
	</ul>
</div>
<div class="modify">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="com_modi_table">
		<tr>
			<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<fmt:message key="solrIndexMgr.description1"/></td>
		</tr>
		<tr>
			<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<fmt:message key="solrIndexMgr.description2"/></td>
		</tr>
	</table>
</div>

  
<script type="text/javascript">
	<c:if test="${not empty success}">
		var msg='${success==1?sendSucess:sendFalse}';
		sysMsg(msg);
	</c:if>
	function rebuildIndex(){
	     this.location.replace('${ctxPath}/tool/solrIndex.html?doAction=rebuildIndex');
	     return false;
	}
	function updateIndex(){
	     this.location.replace('${ctxPath}/tool/solrIndex.html?doAction=updateIndex');
	     return false;
	}
</script>
